#ifndef MENUSCREEN_H
#define MENUSCREEN_H

#include "main.h"
#include <iostream>
#include <list>
#include <string>


class CMenuScreen {
//		std::list<std::string> m_topMenuItems;

		//space between window and menu items
//		int m_spaceTopBottom;
//		int m_menuItemHeight;
//		int m_spaceBetweenItems;
//		int m_numberTopMenuItems;

		//space in pixels between left
		//and right end of menu and window border
//		int m_spaceLeftRight;

		int m_id;
		
				
	public:
		int m_numberButtons;

		//ctor, dtor
		CMenuScreen(int id);
		~CMenuScreen();


		//variables
		struct menuButton {
			std::string text;
			int order;
			int followScreenID;
			//coordinates for top left
			int x1, y1;
			//coordinates for top right
			int x2, y2;
			//coordinates for bottom right
			int x3, y3;
			//coordinates for bottom left
			int x4, y4;
			std::list<std::string> availOptionsList;
			std::string currentSetting;
			int isOptionButton;
		};
		std::list<menuButton*> menuButtonList;
		
		//functions
		///adds a button to this screen object
		void addButton(int order, int followScreenID, 
		 std::string text, std::list<std::string> optionList,
		 std::string curSetting);

		///returns a list of buttons that are part of this screen object
		std::list<menuButton*> getButtonList(void);
		int getID() {return m_id;}
		int getButtonFollowScreenID(menuButton *);

		/**checks all buttons of this screen for collisions with the coordinates
		 * \return returns a pointer to the button that was detected
		 */
		menuButton* detectCollision(int x, int y);
		
		void cycleOptions(menuButton *menBut);
};


#endif
